Fix null error in lightbox plugin when element is deleted.