Fixed double free in take()