Fixed dropdown bug when using optionsFunction.