fix ordered insertion