fix for Datalog to_dict conversion