fixes to pdksh and mksh