small fix for duplicate variable use