fix a bug on the first image