Instrument turns to 1 after pausing and unpausing

How to reproduce:

  1. Go to this test project
  2. Press the green flag
  3. Pause and unpause the project. The instrument has changed, and the tones sound different.
    Why does this happen?

Another problem is when i click directly on the block to execute it (without pressing the green flag) th sound begin and if i press again on the block to stop the script, the script stop but not the sound (Beeeeeeeeeeee: single note...)

Your project sounds like a sorting algorythm