Fix bug: score was increased multiple times for a single scan