Fix possible bug on drawing first image.