further fixes for bug #108 (likely, will need improvement for OMEROMatlab createMask)