Fixed minor mistake about testing ensure_w.