Fixes bug in listeners