Bug fixes and such