Fix for redirect issue