issue #11 fix

(cherry picked from commit 9117e8f33c9783c384cfe1a10ff54066ba09223a)
tests for issue #11
Merge pull request #15 from marcinn/support/issue11

Issue 11 fix w/test