Fixing json validation bug