fixing bug #4929
using Long instead of Integer