Fixed bug in prepare.mask.bases