Fixed image deletion bug.