cleaner fix for issue 2005
Merge pull request #213 from timrae/issue2005_basic

cleaner fix for issue 2005