fix waiting for connection. Fix readme (program quit)