fixed issue with nil value
fixed issue with nil value