func and ui fixes