fix tests and correct a tiny bug in tag checker