Bug fixes and other things I cant remember