Fix for length problem with tags