fix portal bug