fix bug with not nil value