Fix some deprecated methods