fixed json parsing