Added some linux-specific fixes