Fixed nullpointerexception in send