Fixed indentation. Add check in json parsing.