Fix for the same problem in insert()