view: fix a bug of undefined variable