Fixes in the memory managment, additional protections

No match.