fix teleporting issue