Conditionality for thank you page not working