Fix strange bug when exiting mode while music is stopping