fix deprecated error