LOCAL JS scope fix