removed an unnecessary const_cast.