Fixed some crappy code