Merge pull request #25 from TheBoolean/master

fix rare fatal error
Merge pull request #6 from smalot/master

Merge pull request #25 from TheBoolean/master