Fixed max integer issue