bug fix in gmate script