Added (fixed?) support for self-closing tags