minor bugfixes and fixes for linux