fix entity tag handling