fixed init crash
Merge pull request #1 from edvorg/master

fixed bug in initialization