Fix elements append.

Reported by:	@AllanJude