Fixing bugs and stuff