AS-109 fix memory leak