[PLINK-588] - Fixing masked operations.
Merge pull request #409 from pedroigor/PLINK-604

[PLINK-588] - Fixing masked operations.