Fix bug when resetting portal