Fixed problem caused by variable name change