fix typing for multiple masks