one small change, fixes hanging in event loop.