Adjust payload size and others code adjustments