Fix bug in update rights