fix redirect bug in categories