Some fixes for Linux