Fix case sensitivity bug in AD searching