ui and db fixes