Fixed some compile errors