Fix music switching bug

Fix #1965