Fixed deprecated warnings.