fix top bar behavior