Corrected toggle asm mask creation code