MDL-25659 fixed overriding of fields variable and improved coding style in similar...