Urgent fix: lightbox initializing safeguard now working properly