fixed defer with wrapped recv
added copy tests