fixed targetmask bug