limit number of possible active mask to 4 issue #30