Added error checking to default destructors.