Linux love

Some more fixes. Still lots of problems, but this reduces the number of them.