Fix flags and connection not being set properly in NrvMemoryProtocol