fix bugs in the GgTrackball class