This potentially fixes most deprecated warnings