Fix deprecated syntax for dicts