fixed bug with multiple closing tags