Fixed Listener logic