Fixed duplicate variable definition in script