bug fix. Erroneous variable error