removed bug in update procedure