first round of fixes from attempting to use on real Linux system