fixed json validation