Fixes for Ubuntu

I had to make these small tweaks to make running tests work on Ubuntu.