fixed bug in listen