fixed deprication error