Fix const iterator issue