Fixing error in view