Fix for #842
Merge pull request #843 from kalxas/master

Fix for #842