Added code to detect if tag size is too large.