fixed bug, uninitialized IDMap in NewRegistry
adding chunks to support multi-part messages