Some fixes for linux