Fixing deprecated calls.