generics type check fix for daniel