Fixed to match changed definition in Common.
a minor fix for group in range
adding extra check on computing in range closeness