Implemented issue #308