fix shell breakage after toggling monitoring