replaced system.exit with graceful disposing of GUI