fixed the bug for fieldnames