fixed bug @ is_int_value function (reusing global variable)