fixed an issue in generatePayload that would generate an extra 0 if the payload byte was 0