Fixed some depracation warnings.