adding automatic double redirect resolution