Fix issue #166