fixed a redirect bug!