Better updating of nested keys