Fixed out of bounds read.

payload_type seems to be completely useless and should be removed.