Limit number of possible active mask to 4 issue #37