variable bug fix