fix longstanding issue with deleting thumbnails