cast int for offset and limit