fix up gradient problem with deleting images