Fix a bug occurring when there are no dependencies