fixes for clearing lighbox custom templates