fixing bug with null property values