corrected a small bug (variable name not consequent)