bug fixes & performance enhancements