revert changes from PR #531