Fix method name in deprecation warning