bugfix view local variable undefined