Fixed tests by added explicit cleanup calls