fixed stupid bugs and stuff