fix deprecation warnings for 0.12.4