Fix bug: did not remove old images problem