minor fixes to pull-req #537