closure defer not works as I think