Added chain redirect handling