Fixed bug with filtering overlapping codes