Fixed tests broken by listener cleanup at 0d08eb604c.