Fix deprecated methods