Changed messaeg manager and discovery thread (probably) works.