Bug fix after renamed variables.