BUGFIX deadlock on json_lock