Fixed delay not being passed on to redirect_to function