Fix deprecation warning that would never fire