bug fix and UI work