Corrected the deprecation warning.