BUG:fixed the mask creation for histology