fix disappearing sound on browser window close

fixes #1 and #21