fixes bugs intrduced in pr 121 and more

this pr fixes bugs. Especialy 2 bugs introduced in pr 121.
we also disable get_user_choice during prestart events becasue we shouldn't use dialogs during prestart events.
this pr also contains a fix for 21905 which was no introduced in 121.