Fix bug with refer failing on lean vars
Munge namespace name for lean vars