bug fixes and such