Added tags length check