bugfix for redirect