fixed bugs and stuff