Fix bug regression re-added in commit cb76ac