Fix potentially undefined variable