added a close to the nocloseinput stream in KVMessage constructor