fixed some compile errors