Fixed a lot of memory management issue that arised when working with CNS mini-app