Fix deprication warning