fix grid bug with setting nil object.