Change variable scope in monitoring dialog