fix bug with self closing tags