Update listen code
Merge pull request #1310 from Arcovion/patch-1

Update listen code