minor bug fixes and finishing relation handshake