avoid nil object issue