Made payload consolidation py3 compatible