fixed viewdefinition bug
fixed another double execution bug