Fix some compile errors