fixed portal bug