Fixed a bug which left empty thumbnails when there was a failure creating them