Replaced Depreciated calls.