fix problem in qt message handler