Don't use deprecated methods.