fix constant bug on redirect