Fix #308 Crash in mask code in MP driver