Fix the action being executed after the redirect occured.