checks for redirect