fixed merge error and improved marshalled data handling