Close #307.
Merge pull request #309 from mageekguy/#307

Close #307, thanks to @geraldcroes for the bug report.