fix bug for null geometry