Major fix of issue #26