fix deprecated warning