fixed bug with tags within tags