Event listener fixes