static test: fix a logic error