I don't think this is right. It should only be set if it's higher than the last highest seen value.