fixed variable typo in deprecation function