Variable bug fix