fixed bugs in gktool.