Added check for length and moved transmission to new thread