Fixed warning for undefined variable