Trying to solve crash in mob_thread_func

It was tux to a null np->env.
Merge pull request #5 from pbosetti/master

Trying to solve crash in mob_thread_func