Remove undeclared var ref