Fix bug in #669