memory issue partial fix 2