Fix generics declaration related to UniqueKey usage