reordered topbar fixed code

This is a fix for #2022