fix a small bug with listen