Fixing null ref errors when duplicated comments exist