UI and state engine fixes