Fixed Depreciated Functions.