forget to declare ui_elements local variable in __init__