Fix memory management.
Version 0.9.2