fixed some deprecated calls