Fix start/endElement calls

Change-Id: I82525020d148de276ece44406180cc59e759d93f