disconnect media player before quit

fix error