Fixing several bugs but mainly bug 4219 

Fixing also :
- bug 4218
- bug 4221
- bug 4225
- bug 4233