Fix #2: prefix not being passed to end element constructor