added logic to prevent 'undefined' index errors when selecting <select> options using keyboard;