fix error check on update collection