fix a bug switching payload and padding