Fixed the bug for counting the copy number