minor fixes to unix code