Deal with deprecation warning