fixed problem where test resources were not being cleaned up