fixing bug when get_payload returns None