Debug: bugfix on redirect