fix bug on clear unused images.