Added check for offset and limit.