made AsInt return long instead of int