Add generic type in constructors to make code backward compatible