Fix bug related to Gtk.TreePath

Acutally, I'm not sure whether this is the right way to fix this bug.
Any suggestions is welcome.