revert changes from PR 502