Fix for redirect

Needed to add an else statement.