MV Yanfly's Stat Allocation bug

Hey,
I'm using Yanfly's Stat Allocation plugin (for MV) and the function to Add Bonus AP script callis broken - it works the same as the Set Bonus AP script call.
Does anyone happen to have a fix for that?
If so I'd appreciate the help 🙂
Below is the function (not edited). In the last line (not counting the final bracket) you need to change value to ap

Game_Actor.prototype.gainBonusAp = function(value, classId) {
this.initAllocationPointsCheck();
classId = classId || this._classId;
var ap = this._bonusAllocationPoints[classId] || 0;
ap += value;
this.setBonusAp(value, classId);
};
Below is the function (not edited). In the last line (not counting the final bracket) you need to change value to ap

Game_Actor.prototype.gainBonusAp = function(value, classId) {
this.initAllocationPointsCheck();
classId = classId || this._classId;
var ap = this._bonusAllocationPoints[classId] || 0;
ap += value;
this.setBonusAp(value, classId);
};
Oh, it works perfectly. Thank you very much 🙂

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-stat-allocation-bug.182115/