fix bugs related to a changed variable name