[PATCH v11 4/9] fix potential logic error