Fix all deprecated warnings