Fixed some deprecated methods