Fixed some compile errors on linux