fix memory leak in AISequence