Conditons to change "Thank you" message does not work.