Assigning ui element to weak property