Error checking for incorrect tags