Fails with error when generics are not initialized properly