fix deprecated warnings