fixed compile errors on Linux