Fixed some deprecated calls