Fixing nested assignment