fixes #278

pull request to fix issue #278