fixing bugs and stuff