Use correct variable in update()