finally get it work again. create_pkgs was modifying only a local copy of the ptr, so it was 'returning' unitialized junk data. gather was asking to receive the wrong amount of data on the parent end, resulting in more junk data. also cleaned up the code to remove multiple if conditions for differentiating between master and workers.