Fixed bug in creating annotation mask for moving scan.