Fixing tests and deactiave bug where contexts were not removed