fix auto pause behavior and add event