solve mem error