Don't use outdated methods

This fixes #1362.