Logic problem with hidding fields