Make top_bar() static to fix the bug