fix unneccessary redirect