Error in calculating ending sector number.