Fix format validation flaws