minor bug fix in sending and receiving command