Fix for Issue #350. Fix for MAGN-337.