Avoid undefined variable reference