fixed bug with multiple socket listeners