fix bug at server last command sent