CON-2210 use local instead of global var