Update ui.py

clean up sloppy tests leading to bugs when saving 0 values