Fix memory problem when debug

fix #9