Bug fix for event listeners not being re-attached on render