Joshua's fix,
swapping:
for (unsigned int l = 0; l < cover2.size(); l++) {
and
for (unsigned int k = 0; k < cover1.size(); k++) {