Fix const cast warning