Fixed some UI update bugs