fixing bug with null property