ref #5: fix error at definition
cherry-pick fix at master: fix error introduced from b98a3aa