moved halt after terminate.