Fix $transport not defined bug