fix bug in parsing command code