Fix SQL with new Files json interface