fix a bug with chatbox