properly check for tags