fixed patch cloning and logger terminate