Fix possible runtime exception
Merge pull request #12 from HairyFotr/master

Fix possible runtime exception