Fix error when no hidden or visible fields at all