Handle all possible values of Browser/StartupBehavior and improve startup logic