Check for root tag end when passing endElement

 * This solves issue #24