fix the problem about the size of s