Fix bug in UI