Upgrading deprecated methods.