fix issue with int/long not being accepted as Object in conversion

not sure it's the best fix, but seems to fix it