Add proper multi-part support, close #1163