fix bug in redirect skipping