fix the way of removeing a mesh

It wasn't removing the object.