Fix $Offset and $Limit logic.