fix 0.4 deprecation warnings