Fixed exception
Merge pull request #184 from Bladrak/exceptionFix

Fixed exception