fixed all compile errors