fixed bug in messages repeating