bashism fixes