Fixed depreciated warning