fixed bug to prevent duplication of messages on screen