fix images being dumped out of order