fix a bug & update the UI