Fixed compilation issues with generics, which appeared with some compilers.