Reconstructor for digits and fix of some bugs