fixes to work on linux