Fixing erroneous variable