reapplied fixes to patch branch
Merge pull request #3 from return/patch-1

reapplied fixes to patch branch