added code to clean up _chain property when done() is called