Variable reference bug fix.