Remember the last selected instance and select it on startup
Fix crash when no instances are available