corrected some compile errors