fix bugs in messages