Did some work on Linux compatibility