fixed compatibility issues on linux