fix monitor thread. Bug #726