Fixing JSON API