Fix bug in effective coverage calculation