Fix issue #5 by making sure that images are loaded before purging them. 

Adds a loaded filter before reordering fixing #5.