Fix bug in commit 29e7cc952cbc90cd24dcefb13eb3642785ee6909