undo pull request #226: see more details in issues #221 and #232