is this run before red error popup or after and if after under which conditions? Otherwise LGTM