script fixes for linux