Removed EnableOptimizations in bundle creation. Sketching solution when getting error while working in preview page.
Added control of dirty application form when the user wants navigate out of the page.