Corrected all compile errors