Added some fixes to keyboard navigation (reverts dde07a613f70448d21b8139c077b2b0a361b338a)