new injection code, and corrected shutdown problem