Removed call to checkedSendHandler in connect (caused crashes) and fixed the use of a wrong variable name in receiveHandler.