change ui, fix memory leak