fixed compile errors under Linux