Fixing JSON compatibility issues