Fix use of unallocated variable