fix of a missing variable bug