lawofcos returns negative lengths