Fixed bugs and stuff