Fix #32. Minor bug reported by Max-Kolodezniy