more fixes on UI and db