Merge "Fix the maximum frequency value calculation" into tm-dev