fix segfault on log
Merge pull request #2 from Roguelazer/fix_segfault

fix segfault on log