js: fix bug in PowerSupply