fix few bashisms