fixed updateunknowns (went out of bounds)