reset of message taken out of if statement