Fixed some deprecated calls.