Implementation of issue #16