delay sendMessage till connection is ready, should solve #11