some cleanup

fixed a bug caused a message to show up multiply times