Fixed ui.py to make usable again