fix batch insertion with multiple items