Changed constructor logic. Throw exception if tag was not set.