Change to .GetInstance instead of new to avoid deprecation warnings