remove event listeners before adding them.