added fix for redirect functionality.