fix strange issue where payload.slice fails