fixed computePred in gridmotiongraph