parser: fix a bug that failed commands are ignored