fixed all compile errors.