Fix #16 - unregistered mask

Call for an unregistered mask causes a segmentation fault
Merge remote-tracking branch 'origin/2.0'