Fixing logical errors in TagTest