Fix some bugs for 2.2 version:
-Cursor has to be close
-no memory overflow loading tt