fix regression

introduced by 702f7e1f1d7c2d50621f2f326c185ddb2034d174
fix deprecation warning