Fixed some bugs and some other stuff apparently