Fix mismatch of variable name and the one mentioned in the thrown Exception