Fixed some bugs

okay when I say some bugs I meant a lot of bugs. a lot of bugs.