Fix logic error, some tests were skipped