apcupsd - fix code