The red square are just spawned to mark the spots where the big squares change to blue or green if you click on them although the selection is not up. the problem is that when clicking on that spot it changes even if the selection is not there and it seems that from the beginning on those spots are there.
little example:
1. i start the game
2. i click on a spot where later on will appear the red squares
3. the big square changes to green/blue without showing the selection
issues:
1. the selection was not set there yet
2. squares can be changed without selection
...hope that helps to understand.