bug fix: memory not clear