Fixed a bug with the modal window

Fixed a bug where modal window wouldn't reset it's state after saving a new application