Fixing JSON parsing