Fix a few bugs with mask handling
Fix a few bugs with mask handling

hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,hoangt/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziProcessor,hoangt/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor