Class type not compatable in generic usage