Add feature from issue #228
Merge pull request #243 from afonsomota/master

Add feature from issue #228