Fixed some terrible mistakes