slight modification to compile better on linux