Patch for issue #406
Merge pull request #409 from Sovietaced/master

Issue #406