fixed bugs in wt_gmr