Fix valid payload checking