small bugfix in insert()