fixed wrong deprecation warning