Fix empty array variable access