Fixes generics issues