UI bug fix and back end bug fix