Looking for bug in update()