Fix issue #186, preparing for merge