fixed some json validation issue.