minor fixes to pull-req #537

minor fixes for pull-request `537` and fix typo