Added cleanup on deinit.