fixed small variable bug