fix up const_cast warning