Fixed and sileneced a deprecation warning