[SPHINX] Fix offset and limit type. Cast to int