Fixed bug with generics.