fixed deprication warning