Event listener bugfix