fix crash when energy particles go into portals