Fix machine enable monitoring in js