BUGFIX: loop in renaming without conflict & thread termination