Fix bug with listeners