Polish the logic of verifying "pending" case