bug fixes and more