fix for regression in #2009

you hadn't defined the inverse variable.