Trouble with PoE state in 6.39.1

I have the script:

:local PoEStatus;
/interface ethernet poe monitor ether5 once do={:set PoEStatus $“poe-out-status”;}
:if ($PoEStatus = “powered-on”) do={
:log info message=“PoE is ON”;
} else={
:log info message=“PoE is OFF”;
}
It worked perfectly in 6.38.5. After updating to 6.39.1, I can’t get $PoEStatus… What happened ?

Maybe it is a bug

I have tried in 6.38.1 and 6.39.1 and it doesn’t work in 6.39.1 it looks like value poe-out-status has nothing and it really has value

Any fix for this ?

Why do not use implemented RouterOS methods?
https://wiki.mikrotik.com/wiki/Manual:PoE-Out#PoE-Out_Monitoring