Fix some deprecated warnings