Proper new masks generation