Fix crash for secondary application.

Merged Julien Wadel requested to merge fix/optimization into master

Merge request reports