bug fixes and optimization