Made music thread stop safely