fix LONG.MIN_VALUE issue