Improve teleportation logic