changed order of custom actions / page reload in app.run, for better reliability