fix a bug with hidden text fields