remove static_cast from constructor.