Bug in segment size checks