Fix problem with insert