Fix action calculation