Fixed NPE crash when going through portals.