Fix enable and disable monitoring