Moved the initializing of action panel to be executed earlier.