Calling addListeners() at the right time