Fixed some crappy bugs