Changed Dispose to system.exit