Fixed error in send data handler