destroy all event listeners before restarting