you need to reset the message here. Your new code is not equivalent