htc_monitor: fix BAD coding from HTC using global vars