Fix another bug when commitsSize==0