Fix failure to remove markers when the checkbox is unticked.