fixed variable reference inside loadOptions function. investigating issue related to posting to REST service