Fix how listeners are initialized