Conditions redirect is not working