Fix const_cast<> hack.