Fixed most of the other bugs