Fix deprecated methods.