Bug fix to JSON rest client