fix infinite redirect bug for hidden items