Further bugfixes in UI and logic