Fixes a bug with attributes when requiredFlag is null
Updated Version 3.1.18