Fix some const casts