Further code cleaning and debugging of a non deterministic bug