Fixing view/View function in trait