replaced process id with thread id.  Added use thread to all modules.