fix playback stopped at a wrong time and wrong repeat