some fixes to get it back to work on Linux