Fixed scoping in view destructors