returning back exit on rising of the terminating flag