Fix xhr event listeners