Fixed some issues with teleport.