Fix bug spotted by dialyzer.