fix for when values are set to null