Fixes minor bugs and other stuff