maintain correct sequence order when using existing images (issue #25)