Fixed a bug in GTR. Added tests for GTR.