Fixed error in assigning contigs