Fixed deprecated warnings