nil2 fix and random crash fix on teleport