fix doubles count