fixes #610 - handle mask fields