fix cleanup()