Assign correct view