fixed bugs in messages