bug and UI fixes