Fixes for ksh quirks