fixed compile errors