Fixed a bug where if application path is optional, it should not be exported to XML.