fix deprecated js