several bug fixes and UI tweaks