beautifications
fixed bug (causing ressources not to be freed)