Feature/long listen bug

This makes the behavior of the listener consistent with the documentation.