Fix #786
Merge pull request #788 from ninjalulz/master

Fix #786