bug fixes and changes