Fixed selfcontained payload bug

Fixes github issue #65