fixed some problems with masked input and optional choice fields