fix waiting for threads with new listen gem