small bug fix, wrong variable name used