Handle exception
Fix json parsing