Fix the scanDatabase function for both Reference Link and Select Box Link drivers