fixed bad var issue