Fixes #1247 Thread prefix error

Fixes #1247 Thread prefix error

I updated some parts of the code. Yeah..