Fix makePayloadWithSources bug, change documentation