fix regression of PR #515