fix bug with null value