Better fix for negative length