more fixes for redirect