fix some sample bug #18