fix bug--forgot to clear the img_infos
const correctness
first commit