Fixed bug in scheduler internal thread (should solve instances not registering to tracker after some time)