XXX: fix up mask