fix bug for leetcode