bug fix in popping msgs