Add bounds checking for the selected field