Fix box ordering on keyboard next and previous