fixed bug with null value