A few extra changes to make it work properly on linux

A few more things I found after using it today.