fix crash
Merge pull request #48 from MadrMan/fixes

fix crash