The condition to change the Thank you page is not working