Changed how the payload_data gets wiped and changed the sanity check.

Need to keep an eye on it and make sure it doesn't mess up again.