fixed some UI bugs.