fix a bug in index redirection

Signed-off-by: Joshua Rubin <jrubin@zvelo.com>