Fixes a bug where music sometimes kept playing when it should have stopped