Fixing teleport logic