minor fixes to work on linux