actually close before the return