fix another memory issue