Fix another bug found while reviewing previous pull request