fixed listen functions responding to null handles