prevent division by 0 and also 0 pageSize prevent with fixed sized items.