fixing bug in predictHop