Fixed crashes
Merge pull request #6 from iameric1986/master

Fixed crashes