Add feature from issue #228