Versioin 3.2, 4.0 and 4.1

Explained in the code all the fixes