fixes major errors