Merge "range checking for tnf" into gingerbread