fixed possible segfault
Merge pull request #23 from adjust/possible_segfault

fixed possible segfault