fixed to check json parsing error