misc fixes to previous commit