Fix arrow up/down bugs