fix #6495 (up/down keys broken after running top)