Applying #6 to master branch

Thanks to @ovstetun for the contribution.