Fix reference error s/localval/local