Fixing a couple of bugs on linux systems.