fix tr.635 (max-min is limited by 2^31)